<template>
    <v-btn :block="block" :disabled="disabled" style="min-height: 100%;" :color="color" @click="() => {$emit('click')}">{{ name }}
        <v-dialog v-if="dialog" activator="parent" max-width="500px">
            <template v-slot:default="{ isActive }">
                <v-card :title="dialogTitle">
                    <div style="padding: 10px;">
                        <slot name="dialog" :isActive="isActive">
                        </slot>
                    </div>
                </v-card>
            </template>
        </v-dialog>

    </v-btn>
</template>

<script setup lang="ts">
const props = defineProps<{
    name: string
    block?:boolean
    color?:string
    dialog?:boolean
    dialogTitle?:string
    disabled?:boolean
}>()
const emits = defineEmits<{
    (e:'click'):void
}>()
</script>
<style scoped>
</style>